package com.tai.design.factory.simple_factory;


/**
 * The type Coffee store.
 *
 * @version v1.0
 * @ClassName: CoffeeStore
 * @Description: TODO(一句话描述该类的功能)
 * @Author: taylor
 */
public class CoffeeStore {

    /**
     * Order coffee coffee.
     *
     * @param type the type
     * @return the coffee
     */
    public Coffee orderCoffee(String type) {

        SimpleCoffeeFactory factory = new SimpleCoffeeFactory();
        //调用生产咖啡的方法
        Coffee coffee = factory.createCoffee(type);

        //加配料
        coffee.addMilk();
        coffee.addsugar();

        return coffee;
    }
}
